-
Notifications
You must be signed in to change notification settings - Fork 83
refactor(deps): Document standard rules for writing lib install tasks and apply across all existing tasks: #1479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughAdds dependency Taskfile documentation and refactors Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Developer
participant Runner as Taskfile runner
participant Installer as deps:utils:install-remote-cmake-lib
participant Remote as Tarball host
participant Build as CMake / Build system
Note over Runner,Installer `#D6EAF8`: Centralized install flow per dependency
Developer->>Runner: invoke dependency task
Runner->>Installer: call(LIB_NAME, TARBALL_URL, TARBALL_SHA256, CMAKE_GEN_ARGS, CMAKE_SOURCE_DIR)
Installer->>Remote: download tarball (TARBALL_URL)
alt SHA256 provided
Remote-->>Installer: tarball
Installer->>Installer: verify SHA256
else no SHA256
Remote-->>Installer: tarball
end
Installer->>Installer: extract to <lib>-extracted
Installer->>Build: cmake configure (CMAKE_GEN_ARGS)
Build->>Build: build & install per args (shared/static, tests off/on)
Build-->>Installer: artifacts installed
Installer-->>Runner: return status
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related issues
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
give me a diff of each lib install task in the current version against the files in PR #1377, diff should include comments as well. |
|
@coderabbitai Diff should include the comments inside the tasks. not your own comments. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 114 🏁 Script executed: Length of output: 278 🏁 Script executed: Length of output: 62 🏁 Script executed: Length of output: 2174 🏁 Script executed: Length of output: 20857 🏁 Script executed: Length of output: 388 🏁 Script executed: Length of output: 42 🏁 Script executed: Length of output: 956 🏁 Script executed: Length of output: 217 🏁 Script executed: Length of output: 3833 🏁 Script executed: Length of output: 2294 🏁 Script executed: Length of output: 1601 🏁 Script executed: Length of output: 20921 🏁 Script executed: Length of output: 2121 🏁 Script executed: Length of output: 23007 @Bill-hbrhbr: Here are the diffs for each lib install task between PR #1377 and current PR #1479, with all comments inside the tasks preserved: The key structural differences across all tasks: PR #1377 structure (separate files): version: "3"
tasks:
default:
# task contentCurrent PR #1479 structure (inline in main.yaml): task-name:
# task contentMain changes:
Special cases:
All 23 complete lib install tasks have been compared with their full content including comments preserved in the diffs above. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 1397 🏁 Script executed: Length of output: 390 🏁 Script executed: Length of output: 186 🏁 Script executed: Length of output: 92 🏁 Script executed: Length of output: 305 🏁 Script executed: Length of output: 2128 🏁 Script executed: Length of output: 1150 🏁 Script executed: Length of output: 3315 🏁 Script executed: Length of output: 1431 🏁 Script executed: Length of output: 20928 🏁 Script executed: Length of output: 1386 🏁 Script executed: Length of output: 3492 🏁 Script executed: Length of output: 326 🏁 Script executed: Length of output: 7819 🏁 Script executed: Length of output: 24656 @Bill-hbrhbr Here are the diffs for each lib install task comparing the current version in PR #1479 against PR #1377: Summary of Key DifferencesThe diffs reveal the structural changes between the two approaches: PR #1377 (Modular Approach)
Current PR #1479 (Monolithic Approach)
Notable Content Differences
All 23 library install task diffs are shown in the output above. The main difference is the organizational structure, with PR #1377 splitting each library into its own file following a standard pattern, while the current PR keeps them all in main.yaml. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
taskfiles/deps/README.md(1 hunks)taskfiles/deps/main.yaml(14 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1122
File: components/core/src/clp/clp/CMakeLists.txt:175-195
Timestamp: 2025-07-23T09:54:45.185Z
Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.
📚 Learning: 2025-05-28T18:33:30.155Z
Learnt from: anlowee
PR: y-scope/clp#925
File: taskfiles/deps/main.yaml:97-106
Timestamp: 2025-05-28T18:33:30.155Z
Learning: In the taskfiles dependency system (taskfiles/deps/main.yaml), echo commands are used to generate .cmake settings files that are consumed by the main CMake build process. These files set variables like ANTLR_RUNTIME_HEADER to point to dependency locations for use during compilation.
Applied to files:
taskfiles/deps/main.yaml
📚 Learning: 2025-09-15T18:53:15.844Z
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1226
File: taskfiles/deps/main.yaml:522-527
Timestamp: 2025-09-15T18:53:15.844Z
Learning: When ystdlib is built with -Dystdlib_BUILD_TESTING=OFF in taskfiles/deps/main.yaml, it does not require Catch2 settings to be injected via CMAKE_GEN_ARGS since testing is disabled and Catch2 is not needed during the build process.
Applied to files:
taskfiles/deps/main.yaml
📚 Learning: 2025-08-19T07:08:15.583Z
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1229
File: taskfiles/deps/main.yaml:494-504
Timestamp: 2025-08-19T07:08:15.583Z
Learning: In zlib v1.3.1's CMake build system, only ZLIB_BUILD_EXAMPLES is a valid option. Other ZLIB_BUILD_* flags (MINIZIP, SHARED, STATIC, TESTING) and ZLIB_INSTALL are not defined in the CMakeLists.txt and have no effect. Use BUILD_SHARED_LIBS=ON for shared library control and ZLIB_BUILD_EXAMPLES=OFF to disable examples.
Applied to files:
taskfiles/deps/main.yaml
🪛 LanguageTool
taskfiles/deps/README.md
[uncategorized] ~14-~14: Possible missing comma found.
Context: ...d parsing version numbers from download URLs unless the version is used elsewhere. ...
(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~30-~30: Consider using a different verb to strengthen your wording.
Context: ...s, examples, docs or unused binaries to speed up the install process. - Prefer disablin...
(SPEED_UP_ACCELERATE)
[grammar] ~30-~30: The word ‘install’ is not a noun.
Context: ...docs or unused binaries to speed up the install process. - Prefer disabling lib-specif...
(A_INSTALL)
🪛 markdownlint-cli2 (0.18.1)
taskfiles/deps/README.md
37-37: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
38-38: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
🔇 Additional comments (6)
taskfiles/deps/main.yaml (6)
155-186: LGTM: antlr-jar and antlr-runtime refactoring is clean.The antlr-jar task correctly references the global
G_ANTLR_JAR_FILEvariable, and the antlr-runtime task is properly refactored to useinstall-remote-cmake-libwith appropriate CMake flags. The CMP0135 policy and comment explaining its purpose are well preserved.
296-313: Verify whether log-surgeon needsCMP0074=NEWpolicy.The task uses
-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.G_FMT_LIB_NAME}}.cmakeand{{.G_GSL_LIB_NAME}}.cmakeconfig files for dependencies, which may internally use<PackageName>_ROOTvariables. Per the README, CMP0074 should be set to NEW when the component depends on another via<lib_name>_ROOT. Compare this to msgpack-cxx (line 401) and spdlog (line 454), which both setCMAKE_POLICY_DEFAULT_CMP0074=NEWwhen using similar config files.Does log-surgeon's CMakeLists.txt use
find_package(fmt)andfind_package(Microsoft.GSL)that would benefit from CMP0074? If so, add:CMAKE_GEN_ARGS: - "-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.G_FMT_LIB_NAME}}.cmake" - "-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.G_GSL_LIB_NAME}}.cmake" + - "-DCMAKE_POLICY_DEFAULT_CMP0074=NEW" - "-DCMAKE_BUILD_TYPE=Release"
530-546: Verify whether ystdlib needsCMP0074=NEWpolicy.The task uses
-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.G_BOOST_LIB_NAME}}.cmaketo load Boost configuration, which is the same pattern as msgpack-cxx (line 401) and spdlog (line 454). Both of those tasks explicitly setCMAKE_POLICY_DEFAULT_CMP0074=NEW, but ystdlib does not.Confirm whether ystdlib's CMakeLists.txt uses
find_package(Boost)in a way that would benefit from CMP0074. If so, add it to CMAKE_GEN_ARGS:CMAKE_GEN_ARGS: - "-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.G_BOOST_LIB_NAME}}.cmake" + - "-DCMAKE_POLICY_DEFAULT_CMP0074=NEW" - "-DCMAKE_BUILD_TYPE=Release"
465-514: LGTM: sqlite3 and utfcpp follow new naming conventions.Both tasks correctly use the
-extracteddirectory suffix as per README guidance. The direct CMake config file generation via heredoc is appropriate for these special cases that don't use standard CMake install paths.
548-564: LGTM: zlib CMake arguments are correct.Uses only valid zlib v1.3.1 configuration options (specifically
ZLIB_BUILD_EXAMPLES=OFFrather than invalidZLIB_BUILD_*variants). The specialCMAKE_INSTALL_PREFIXhandling is appropriate for zlib's structure.
241-256: Verify whether fmt should build both shared and static libraries.Per the README, tasks should "build both shared and static libraries when possible." The fmt task (line 248) only sets
BUILD_SHARED_LIBS=ON. Verify whether fmt's CMake supports static library builds and whether both variants are needed by downstream consumers.If fmt supports and should build static libraries, add a corresponding flag or consider a pattern similar to liblzma (which invokes the task twice with different
BUILD_SHARED_LIBSvalues).
sitaowang1998
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code lgtm. The doc needs some more works.
sitaowang1998
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This PR just makes me think that we need some documents in yscope-dev-utils to explain how to use the tasks. Some logic, e.g. checksum validation should be in task dependency, is hard to understand at first glance. Do you think it worth the effort @kirkrodrigues ?
@davidlion In the near future, we could add some simple docs on how-to-use the checksum stuff. |
| echo "set(CLP_SQLITE3_INCLUDE_DIRECTORY \"{{.INSTALL_INCLUDE_DIR}}\")" \ | ||
| >> "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" | ||
| mkdir -p "{{.INSTALL_INCLUDE_DIR}}" | ||
| ln -sfn "{{.SRC_DIR}}" "{{.INSTALL_SYMLINK}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I think we prefer to copy instead of using symlink.
- If we want to use symlink, can u expend
-sfnwith the long forms like--symbolic --force --no-derefernece? The guideline requires the use of the full term for clarity unless it has a macOS compatibility issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ln doesn't have long options on macos. Ref: https://ss64.com/mac/ln.html
Co-authored-by: Lin Zhihao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
taskfiles/deps/README.md (1)
9-14: Consider adding explicit guidance onyscope-dev-utils:checksumtask usage.While lines 12–13 mention that checksum validation is encouraged through yscope-dev-utils tasks, the documentation could be clearer by explicitly referencing the
yscope-dev-utils:checksumtask and its usage pattern. This would give contributors a concrete reference when implementing checksum validation in new tasks.If you'd like, I can help draft an expanded section with specific usage examples for checksum validation. Would that be helpful?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
taskfiles/deps/README.md(1 hunks)
🧰 Additional context used
🧠 Learnings (14)
📓 Common learnings
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1122
File: components/core/src/clp/clp/CMakeLists.txt:175-195
Timestamp: 2025-07-23T09:54:45.185Z
Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1156
File: components/core/CMakeLists.txt:772-772
Timestamp: 2025-08-09T04:07:27.083Z
Learning: In the CLP project's CMakeLists.txt, when reviewing changes related to the ${zstd_TARGET} variable usage in test linking, the team is planning a refactoring PR to improve this mechanism. Guards for undefined target variables should be deferred to that separate PR rather than being added in focused dependency migration PRs.
Learnt from: haiqi96
Repo: y-scope/clp PR: 0
File: :0-0
Timestamp: 2025-08-04T18:38:33.130Z
Learning: User haiqi96 requested creating a GitHub issue to document a documentation discrepancy where Task version requirements in docs weren't updated after yscope-utils upgrade in PR #1158.
Learnt from: jackluo923
Repo: y-scope/clp PR: 1054
File: components/core/tools/scripts/lib_install/musllinux_1_2/install-prebuilt-packages.sh:27-32
Timestamp: 2025-07-07T17:41:15.655Z
Learning: In CLP installation scripts, consistency across platform scripts is prioritized over defensive programming improvements. For example, when extracting Task binaries with tar in `install-prebuilt-packages.sh`, the extraction pattern should remain consistent with other platform scripts rather than adding defensive flags like `--strip-components=1` to handle potential tarball layout changes.
Learnt from: junhaoliao
Repo: y-scope/clp PR: 0
File: :0-0
Timestamp: 2025-10-22T21:02:31.113Z
Learning: Repository y-scope/clp: Maintain deterministic CI/builds for Rust; add a check to verify Cargo.lock is in sync with Cargo.toml without updating dependencies (non-mutating verification in clp-rust-checks workflow).
Learnt from: anlowee
Repo: y-scope/clp PR: 925
File: taskfiles/deps/main.yaml:97-106
Timestamp: 2025-05-28T18:33:30.155Z
Learning: In the taskfiles dependency system (taskfiles/deps/main.yaml), echo commands are used to generate .cmake settings files that are consumed by the main CMake build process. These files set variables like ANTLR_RUNTIME_HEADER to point to dependency locations for use during compilation.
📚 Learning: 2025-05-28T18:33:30.155Z
Learnt from: anlowee
Repo: y-scope/clp PR: 925
File: taskfiles/deps/main.yaml:97-106
Timestamp: 2025-05-28T18:33:30.155Z
Learning: In the taskfiles dependency system (taskfiles/deps/main.yaml), echo commands are used to generate .cmake settings files that are consumed by the main CMake build process. These files set variables like ANTLR_RUNTIME_HEADER to point to dependency locations for use during compilation.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-08-04T18:38:33.130Z
Learnt from: haiqi96
Repo: y-scope/clp PR: 0
File: :0-0
Timestamp: 2025-08-04T18:38:33.130Z
Learning: User haiqi96 requested creating a GitHub issue to document a documentation discrepancy where Task version requirements in docs weren't updated after yscope-utils upgrade in PR #1158.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-07-23T09:54:45.185Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1122
File: components/core/src/clp/clp/CMakeLists.txt:175-195
Timestamp: 2025-07-23T09:54:45.185Z
Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-08-09T04:07:27.083Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1156
File: components/core/CMakeLists.txt:772-772
Timestamp: 2025-08-09T04:07:27.083Z
Learning: In the CLP project's CMakeLists.txt, when reviewing changes related to the ${zstd_TARGET} variable usage in test linking, the team is planning a refactoring PR to improve this mechanism. Guards for undefined target variables should be deferred to that separate PR rather than being added in focused dependency migration PRs.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-07-01T14:52:15.217Z
Learnt from: jackluo923
Repo: y-scope/clp PR: 1054
File: components/core/tools/scripts/lib_install/musllinux_1_2/install-prebuilt-packages.sh:6-15
Timestamp: 2025-07-01T14:52:15.217Z
Learning: For installation scripts in the CLP project, maintain consistency in command patterns across platforms rather than applying platform-specific optimizations. When a platform follows a pattern of separate update and install commands (like `apt-get update && apt-get install` or `apk update && apk add`), preserve this pattern for uniform script structure.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-07-01T14:52:15.217Z
Learnt from: jackluo923
Repo: y-scope/clp PR: 1054
File: components/core/tools/scripts/lib_install/musllinux_1_2/install-prebuilt-packages.sh:6-15
Timestamp: 2025-07-01T14:52:15.217Z
Learning: For installation scripts in the CLP project, maintain consistency in command patterns across different platforms (e.g., using separate update and install commands like `apk update && apk add`, `apt update && apt install`, `yum update && yum install`) rather than platform-specific optimizations, to ensure uniform script structure and readability.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-07-07T17:41:15.655Z
Learnt from: jackluo923
Repo: y-scope/clp PR: 1054
File: components/core/tools/scripts/lib_install/musllinux_1_2/install-prebuilt-packages.sh:27-32
Timestamp: 2025-07-07T17:41:15.655Z
Learning: In CLP installation scripts, consistency across platform scripts is prioritized over defensive programming improvements. For example, when extracting Task binaries with tar in `install-prebuilt-packages.sh`, the extraction pattern should remain consistent with other platform scripts rather than adding defensive flags like `--strip-components=1` to handle potential tarball layout changes.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-03-18T07:27:54.738Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 0
File: :0-0
Timestamp: 2025-03-18T07:27:54.738Z
Learning: Double parentheses in the codebase are intentional and required for clang-tidy to pass. These should not be flagged as style issues in code reviews.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-08-17T16:19:24.478Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1100
File: integration-tests/README.md:5-6
Timestamp: 2025-08-17T16:19:24.478Z
Learning: In the CLP project, README.md files can have multiple H1 headings when it makes sense structurally (e.g., "Contributing" as a top-level section alongside the main title). The MD025 markdown linting rule should be ignored in such cases where multiple H1s are intentional.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-08-05T16:13:24.482Z
Learnt from: quinntaylormitchell
Repo: y-scope/clp PR: 1154
File: docs/src/user-guide/guides-using-presto.md:53-55
Timestamp: 2025-08-05T16:13:24.482Z
Learning: In the CLP project's documentation system, numbered list items with line breaks do not require additional indentation for continuation lines to remain part of the list item - the markdown parser correctly keeps wrapped content within the numbered list item even without strict indentation.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-05-06T09:48:55.408Z
Learnt from: kirkrodrigues
Repo: y-scope/clp PR: 881
File: components/core/tools/scripts/lib_install/ubuntu-jammy/install-prebuilt-packages.sh:35-41
Timestamp: 2025-05-06T09:48:55.408Z
Learning: For installation scripts in the CLP project, prefer explicit error handling over automatic dependency resolution (like `apt-get install -f`) when installing packages to give users more control over their system.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-10-17T19:59:35.299Z
Learnt from: junhaoliao
Repo: y-scope/clp PR: 1178
File: components/clp-package-utils/clp_package_utils/controller.py:757-757
Timestamp: 2025-10-17T19:59:35.299Z
Learning: In the y-scope/clp repository, prefer long-form command-line flags (e.g., `--recursive`) over short-form flags (e.g., `-R`) for readability, even if the long form is GNU-specific.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-08-29T07:26:53.532Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1271
File: components/core/tools/scripts/lib_install/centos-stream-9/install-prebuilt-packages.sh:27-33
Timestamp: 2025-08-29T07:26:53.532Z
Learning: In CLP's build tool installation scripts, CMake version constraints should accommodate platform differences rather than using exact version pinning. Range constraints like "cmake>=3.23,<3.24" are preferred over exact pinning (cmake==3.23.5) to allow for platform-specific package availability while maintaining required version bounds.
Applied to files:
taskfiles/deps/README.md
🪛 LanguageTool
taskfiles/deps/README.md
[style] ~32-~32: Consider using a different verb to strengthen your wording.
Context: ...s, examples, docs or unused binaries to speed up the installation process. * Prefer dis...
(SPEED_UP_ACCELERATE)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
taskfiles/deps/README.md(1 hunks)
🧰 Additional context used
🧠 Learnings (15)
📓 Common learnings
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1122
File: components/core/src/clp/clp/CMakeLists.txt:175-195
Timestamp: 2025-07-23T09:54:45.185Z
Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1156
File: components/core/CMakeLists.txt:772-772
Timestamp: 2025-08-09T04:07:27.083Z
Learning: In the CLP project's CMakeLists.txt, when reviewing changes related to the ${zstd_TARGET} variable usage in test linking, the team is planning a refactoring PR to improve this mechanism. Guards for undefined target variables should be deferred to that separate PR rather than being added in focused dependency migration PRs.
Learnt from: haiqi96
Repo: y-scope/clp PR: 0
File: :0-0
Timestamp: 2025-08-04T18:38:33.130Z
Learning: User haiqi96 requested creating a GitHub issue to document a documentation discrepancy where Task version requirements in docs weren't updated after yscope-utils upgrade in PR #1158.
Learnt from: jackluo923
Repo: y-scope/clp PR: 1054
File: components/core/tools/scripts/lib_install/musllinux_1_2/install-prebuilt-packages.sh:27-32
Timestamp: 2025-07-07T17:41:15.655Z
Learning: In CLP installation scripts, consistency across platform scripts is prioritized over defensive programming improvements. For example, when extracting Task binaries with tar in `install-prebuilt-packages.sh`, the extraction pattern should remain consistent with other platform scripts rather than adding defensive flags like `--strip-components=1` to handle potential tarball layout changes.
Learnt from: junhaoliao
Repo: y-scope/clp PR: 0
File: :0-0
Timestamp: 2025-10-22T21:02:31.113Z
Learning: Repository y-scope/clp: Maintain deterministic CI/builds for Rust; add a check to verify Cargo.lock is in sync with Cargo.toml without updating dependencies (non-mutating verification in clp-rust-checks workflow).
Learnt from: gibber9809
Repo: y-scope/clp PR: 955
File: components/core/src/clp_s/search/sql/CMakeLists.txt:8-26
Timestamp: 2025-06-02T18:22:24.060Z
Learning: In the clp project, ANTLR code generation at build time is being removed by another PR. When reviewing CMake files, be aware that some temporary suboptimal configurations may exist to reduce merge conflicts between concurrent PRs, especially around ANTLR_TARGET calls.
Learnt from: anlowee
Repo: y-scope/clp PR: 925
File: taskfiles/deps/main.yaml:97-106
Timestamp: 2025-05-28T18:33:30.155Z
Learning: In the taskfiles dependency system (taskfiles/deps/main.yaml), echo commands are used to generate .cmake settings files that are consumed by the main CMake build process. These files set variables like ANTLR_RUNTIME_HEADER to point to dependency locations for use during compilation.
📚 Learning: 2025-05-28T18:33:30.155Z
Learnt from: anlowee
Repo: y-scope/clp PR: 925
File: taskfiles/deps/main.yaml:97-106
Timestamp: 2025-05-28T18:33:30.155Z
Learning: In the taskfiles dependency system (taskfiles/deps/main.yaml), echo commands are used to generate .cmake settings files that are consumed by the main CMake build process. These files set variables like ANTLR_RUNTIME_HEADER to point to dependency locations for use during compilation.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-07-23T09:54:45.185Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1122
File: components/core/src/clp/clp/CMakeLists.txt:175-195
Timestamp: 2025-07-23T09:54:45.185Z
Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-08-04T18:38:33.130Z
Learnt from: haiqi96
Repo: y-scope/clp PR: 0
File: :0-0
Timestamp: 2025-08-04T18:38:33.130Z
Learning: User haiqi96 requested creating a GitHub issue to document a documentation discrepancy where Task version requirements in docs weren't updated after yscope-utils upgrade in PR #1158.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-07-01T14:52:15.217Z
Learnt from: jackluo923
Repo: y-scope/clp PR: 1054
File: components/core/tools/scripts/lib_install/musllinux_1_2/install-prebuilt-packages.sh:6-15
Timestamp: 2025-07-01T14:52:15.217Z
Learning: For installation scripts in the CLP project, maintain consistency in command patterns across platforms rather than applying platform-specific optimizations. When a platform follows a pattern of separate update and install commands (like `apt-get update && apt-get install` or `apk update && apk add`), preserve this pattern for uniform script structure.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-07-01T14:52:15.217Z
Learnt from: jackluo923
Repo: y-scope/clp PR: 1054
File: components/core/tools/scripts/lib_install/musllinux_1_2/install-prebuilt-packages.sh:6-15
Timestamp: 2025-07-01T14:52:15.217Z
Learning: For installation scripts in the CLP project, maintain consistency in command patterns across different platforms (e.g., using separate update and install commands like `apk update && apk add`, `apt update && apt install`, `yum update && yum install`) rather than platform-specific optimizations, to ensure uniform script structure and readability.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-07-07T17:41:15.655Z
Learnt from: jackluo923
Repo: y-scope/clp PR: 1054
File: components/core/tools/scripts/lib_install/musllinux_1_2/install-prebuilt-packages.sh:27-32
Timestamp: 2025-07-07T17:41:15.655Z
Learning: In CLP installation scripts, consistency across platform scripts is prioritized over defensive programming improvements. For example, when extracting Task binaries with tar in `install-prebuilt-packages.sh`, the extraction pattern should remain consistent with other platform scripts rather than adding defensive flags like `--strip-components=1` to handle potential tarball layout changes.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-08-09T04:07:27.083Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1156
File: components/core/CMakeLists.txt:772-772
Timestamp: 2025-08-09T04:07:27.083Z
Learning: In the CLP project's CMakeLists.txt, when reviewing changes related to the ${zstd_TARGET} variable usage in test linking, the team is planning a refactoring PR to improve this mechanism. Guards for undefined target variables should be deferred to that separate PR rather than being added in focused dependency migration PRs.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-03-18T07:27:54.738Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 0
File: :0-0
Timestamp: 2025-03-18T07:27:54.738Z
Learning: Double parentheses in the codebase are intentional and required for clang-tidy to pass. These should not be flagged as style issues in code reviews.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-08-17T16:19:24.478Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1100
File: integration-tests/README.md:5-6
Timestamp: 2025-08-17T16:19:24.478Z
Learning: In the CLP project, README.md files can have multiple H1 headings when it makes sense structurally (e.g., "Contributing" as a top-level section alongside the main title). The MD025 markdown linting rule should be ignored in such cases where multiple H1s are intentional.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-08-05T16:13:24.482Z
Learnt from: quinntaylormitchell
Repo: y-scope/clp PR: 1154
File: docs/src/user-guide/guides-using-presto.md:53-55
Timestamp: 2025-08-05T16:13:24.482Z
Learning: In the CLP project's documentation system, numbered list items with line breaks do not require additional indentation for continuation lines to remain part of the list item - the markdown parser correctly keeps wrapped content within the numbered list item even without strict indentation.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-05-06T09:48:55.408Z
Learnt from: kirkrodrigues
Repo: y-scope/clp PR: 881
File: components/core/tools/scripts/lib_install/ubuntu-jammy/install-prebuilt-packages.sh:35-41
Timestamp: 2025-05-06T09:48:55.408Z
Learning: For installation scripts in the CLP project, prefer explicit error handling over automatic dependency resolution (like `apt-get install -f`) when installing packages to give users more control over their system.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-10-17T19:59:35.299Z
Learnt from: junhaoliao
Repo: y-scope/clp PR: 1178
File: components/clp-package-utils/clp_package_utils/controller.py:757-757
Timestamp: 2025-10-17T19:59:35.299Z
Learning: In the y-scope/clp repository, prefer long-form command-line flags (e.g., `--recursive`) over short-form flags (e.g., `-R`) for readability, even if the long form is GNU-specific.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-08-29T07:26:53.532Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1271
File: components/core/tools/scripts/lib_install/centos-stream-9/install-prebuilt-packages.sh:27-33
Timestamp: 2025-08-29T07:26:53.532Z
Learning: In CLP's build tool installation scripts, CMake version constraints should accommodate platform differences rather than using exact version pinning. Range constraints like "cmake>=3.23,<3.24" are preferred over exact pinning (cmake==3.23.5) to allow for platform-specific package availability while maintaining required version bounds.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-06-02T18:22:24.060Z
Learnt from: gibber9809
Repo: y-scope/clp PR: 955
File: components/core/src/clp_s/search/sql/CMakeLists.txt:8-26
Timestamp: 2025-06-02T18:22:24.060Z
Learning: In the clp project, ANTLR code generation at build time is being removed by another PR. When reviewing CMake files, be aware that some temporary suboptimal configurations may exist to reduce merge conflicts between concurrent PRs, especially around ANTLR_TARGET calls.
Applied to files:
taskfiles/deps/README.md
🪛 LanguageTool
taskfiles/deps/README.md
[style] ~32-~32: Consider using a different verb to strengthen your wording.
Context: ...s, examples, docs or unused binaries to speed up the installation process. * Prefer dis...
(SPEED_UP_ACCELERATE)
🔇 Additional comments (2)
taskfiles/deps/README.md (2)
5-7: Clear preference hierarchy is well-established.The documentation effectively communicates that
deps:utils:install-remote-cmake-libis preferred through the "descending order of preference" statement, which addresses previous feedback.
12-13: Checksum validation guidance aligns with PR objectives.The section appropriately documents best-effort checksum validation and encourages use of
yscope-dev-utilstasks for proper checks, addressing Bill-hbrhbr's suggestion to document this practice for future clarity.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
components/core/CMakeLists.txt(2 hunks)taskfiles/deps/README.md(1 hunks)taskfiles/deps/main.yaml(14 hunks)
🧰 Additional context used
🧠 Learnings (28)
📓 Common learnings
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1122
File: components/core/src/clp/clp/CMakeLists.txt:175-195
Timestamp: 2025-07-23T09:54:45.185Z
Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1156
File: components/core/CMakeLists.txt:772-772
Timestamp: 2025-08-09T04:07:27.083Z
Learning: In the CLP project's CMakeLists.txt, when reviewing changes related to the ${zstd_TARGET} variable usage in test linking, the team is planning a refactoring PR to improve this mechanism. Guards for undefined target variables should be deferred to that separate PR rather than being added in focused dependency migration PRs.
Learnt from: haiqi96
Repo: y-scope/clp PR: 0
File: :0-0
Timestamp: 2025-08-04T18:38:33.130Z
Learning: User haiqi96 requested creating a GitHub issue to document a documentation discrepancy where Task version requirements in docs weren't updated after yscope-utils upgrade in PR #1158.
Learnt from: jackluo923
Repo: y-scope/clp PR: 1054
File: components/core/tools/scripts/lib_install/musllinux_1_2/install-prebuilt-packages.sh:27-32
Timestamp: 2025-07-07T17:41:15.655Z
Learning: In CLP installation scripts, consistency across platform scripts is prioritized over defensive programming improvements. For example, when extracting Task binaries with tar in `install-prebuilt-packages.sh`, the extraction pattern should remain consistent with other platform scripts rather than adding defensive flags like `--strip-components=1` to handle potential tarball layout changes.
Learnt from: junhaoliao
Repo: y-scope/clp PR: 0
File: :0-0
Timestamp: 2025-10-22T21:02:31.113Z
Learning: Repository y-scope/clp: Maintain deterministic CI/builds for Rust; add a check to verify Cargo.lock is in sync with Cargo.toml without updating dependencies (non-mutating verification in clp-rust-checks workflow).
Learnt from: gibber9809
Repo: y-scope/clp PR: 955
File: components/core/src/clp_s/search/sql/CMakeLists.txt:8-26
Timestamp: 2025-06-02T18:22:24.060Z
Learning: In the clp project, ANTLR code generation at build time is being removed by another PR. When reviewing CMake files, be aware that some temporary suboptimal configurations may exist to reduce merge conflicts between concurrent PRs, especially around ANTLR_TARGET calls.
Learnt from: anlowee
Repo: y-scope/clp PR: 925
File: taskfiles/deps/main.yaml:97-106
Timestamp: 2025-05-28T18:33:30.155Z
Learning: In the taskfiles dependency system (taskfiles/deps/main.yaml), echo commands are used to generate .cmake settings files that are consumed by the main CMake build process. These files set variables like ANTLR_RUNTIME_HEADER to point to dependency locations for use during compilation.
📚 Learning: 2025-08-09T04:07:27.083Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1156
File: components/core/CMakeLists.txt:772-772
Timestamp: 2025-08-09T04:07:27.083Z
Learning: In the CLP project's CMakeLists.txt, when reviewing changes related to the ${zstd_TARGET} variable usage in test linking, the team is planning a refactoring PR to improve this mechanism. Guards for undefined target variables should be deferred to that separate PR rather than being added in focused dependency migration PRs.
Applied to files:
components/core/CMakeLists.txttaskfiles/deps/README.mdtaskfiles/deps/main.yaml
📚 Learning: 2025-07-23T09:54:45.185Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1122
File: components/core/src/clp/clp/CMakeLists.txt:175-195
Timestamp: 2025-07-23T09:54:45.185Z
Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.
Applied to files:
components/core/CMakeLists.txttaskfiles/deps/README.mdtaskfiles/deps/main.yaml
📚 Learning: 2025-08-13T19:58:26.058Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1184
File: taskfiles/deps/main.yaml:0-0
Timestamp: 2025-08-13T19:58:26.058Z
Learning: In the CLP project, custom CMake find modules (like FindLibLZMA.cmake) are designed to flexibly link against either shared or static libraries based on availability, rather than requiring both variants to be built. The find modules use flags like LibLZMA_USE_STATIC_LIBS and temporarily modify CMAKE_FIND_LIBRARY_SUFFIXES to prefer the desired library type while gracefully falling back if needed.
Applied to files:
components/core/CMakeLists.txttaskfiles/deps/main.yaml
📚 Learning: 2025-06-02T18:22:24.060Z
Learnt from: gibber9809
Repo: y-scope/clp PR: 955
File: components/core/src/clp_s/search/sql/CMakeLists.txt:8-26
Timestamp: 2025-06-02T18:22:24.060Z
Learning: In the clp project, ANTLR code generation at build time is being removed by another PR. When reviewing CMake files, be aware that some temporary suboptimal configurations may exist to reduce merge conflicts between concurrent PRs, especially around ANTLR_TARGET calls.
Applied to files:
components/core/CMakeLists.txttaskfiles/deps/README.mdtaskfiles/deps/main.yaml
📚 Learning: 2025-08-03T18:56:07.366Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1124
File: components/core/cmake/Modules/FindBZip2.cmake:49-65
Timestamp: 2025-08-03T18:56:07.366Z
Learning: In CLP's custom CMake Find modules, `FindStaticLibraryDependencies` populates the `*_DYNAMIC_LIBS` variable even when building with static libraries. When the main library is static, all dependencies must also use static libraries - there's no fallback to shared libraries for dependencies.
Applied to files:
components/core/CMakeLists.txttaskfiles/deps/main.yaml
📚 Learning: 2025-08-06T07:32:28.462Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1156
File: taskfiles/deps/main.yaml:70-71
Timestamp: 2025-08-06T07:32:28.462Z
Learning: In LZ4's CMake build system (build/cmake/CMakeLists.txt), the option to build static libraries is `BUILD_STATIC_LIBS=ON`, not `LZ4_BUILD_STATIC=ON`. The correct options for building both shared and static LZ4 libraries are `-DBUILD_SHARED_LIBS=ON` and `-DBUILD_STATIC_LIBS=ON`.
Applied to files:
components/core/CMakeLists.txttaskfiles/deps/main.yaml
📚 Learning: 2025-08-19T07:08:15.583Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1229
File: taskfiles/deps/main.yaml:494-504
Timestamp: 2025-08-19T07:08:15.583Z
Learning: In zlib v1.3.1's CMake build system, only ZLIB_BUILD_EXAMPLES is a valid option. Other ZLIB_BUILD_* flags (MINIZIP, SHARED, STATIC, TESTING) and ZLIB_INSTALL are not defined in the CMakeLists.txt and have no effect. Use BUILD_SHARED_LIBS=ON for shared library control and ZLIB_BUILD_EXAMPLES=OFF to disable examples.
Applied to files:
components/core/CMakeLists.txttaskfiles/deps/main.yaml
📚 Learning: 2025-07-24T21:56:05.806Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1124
File: components/core/cmake/Modules/FindBZip2.cmake:60-60
Timestamp: 2025-07-24T21:56:05.806Z
Learning: In CLP's custom CMake Find modules (like FindBZip2.cmake), when building with dynamic libraries, the code intentionally uses `bzip2_PKGCONF_STATIC_LIBRARIES` as input to `FindDynamicLibraryDependencies`. This is a deliberate fallback mechanism to ensure all library dependencies are resolved even in dynamic builds, using the static library list from pkg-config as a source of dependency information.
Applied to files:
components/core/CMakeLists.txt
📚 Learning: 2025-10-14T20:35:29.944Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1377
File: taskfiles/deps/cmake-libs.yaml:240-260
Timestamp: 2025-10-14T20:35:29.944Z
Learning: In msgpack-cxx, the CMake option `MSGPACK_BUILD_TESTS` defaults to `OFF`, so it does not need to be explicitly disabled in CMAKE_GEN_ARGS.
Applied to files:
components/core/CMakeLists.txttaskfiles/deps/main.yaml
📚 Learning: 2025-09-03T07:29:35.223Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1107
File: components/core/src/clp_s/CMakeLists.txt:106-116
Timestamp: 2025-09-03T07:29:35.223Z
Learning: In the CLP project, do not suggest adding CONFIG or MODULE specifications to find_package calls. The maintainers prefer using find_package without these mode specifications.
Applied to files:
components/core/CMakeLists.txt
📚 Learning: 2025-06-27T01:49:15.724Z
Learnt from: sitaowang1998
Repo: y-scope/clp PR: 1044
File: .github/workflows/clp-core-build-macos.yaml:0-0
Timestamp: 2025-06-27T01:49:15.724Z
Learning: In the clp project, manually setting LDFLAGS for library paths can cause runtime errors because it interferes with CMake's built-in library discovery and linking mechanisms. CMake can identify and correctly link to libraries on its own without requiring manual LDFLAGS configuration.
Applied to files:
components/core/CMakeLists.txt
📚 Learning: 2025-08-04T17:26:17.098Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1124
File: components/core/CMakeLists.txt:167-170
Timestamp: 2025-08-04T17:26:17.098Z
Learning: In CLP's CMake configuration for BZip2, Bill-hbrhbr prefers using HINTS parameter for path-based resolution rather than version pinning in find_package(). The primary concern is ensuring the task-installed BZip2 is found instead of system copies, not enforcing specific versions.
Applied to files:
components/core/CMakeLists.txttaskfiles/deps/README.md
📚 Learning: 2025-08-25T07:27:19.449Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1262
File: docs/src/dev-guide/components-core/index.md:50-50
Timestamp: 2025-08-25T07:27:19.449Z
Learning: In the CLP project, nlohmann_json version 3.11.3 is installed through their dependency management process, but they don't enforce version constraints in CMake find_package calls - they control versions through installation rather than CMake version pinning.
Applied to files:
components/core/CMakeLists.txttaskfiles/deps/main.yaml
📚 Learning: 2025-08-18T05:43:07.868Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1184
File: components/core/cmake/Modules/FindLibLZMA.cmake:21-24
Timestamp: 2025-08-18T05:43:07.868Z
Learning: In the CLP project, all supplied `<lib>_ROOT` variables will live within the `CLP_CORE_DEPS_DIR` as part of their architectural design. This means that using CLP_CORE_DEPS_DIR for library discovery in custom Find modules is the intended approach, and prioritizing individual `<lib>_ROOT` variables over CLP_CORE_DEPS_DIR is not necessary.
Applied to files:
components/core/CMakeLists.txt
📚 Learning: 2025-08-06T08:10:26.381Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1156
File: components/core/CMakeLists.txt:195-202
Timestamp: 2025-08-06T08:10:26.381Z
Learning: According to Bill-hbrhbr, in LZ4's CMake configuration, the correct package name for find_package is lowercase "lz4", and the exported targets use uppercase namespace "LZ4::" with lowercase prefixes (LZ4::lz4_static, LZ4::lz4_shared), not lowercase namespace "lz4::" as initially assumed.
Applied to files:
components/core/CMakeLists.txttaskfiles/deps/main.yaml
📚 Learning: 2025-05-28T18:33:30.155Z
Learnt from: anlowee
Repo: y-scope/clp PR: 925
File: taskfiles/deps/main.yaml:97-106
Timestamp: 2025-05-28T18:33:30.155Z
Learning: In the taskfiles dependency system (taskfiles/deps/main.yaml), echo commands are used to generate .cmake settings files that are consumed by the main CMake build process. These files set variables like ANTLR_RUNTIME_HEADER to point to dependency locations for use during compilation.
Applied to files:
taskfiles/deps/README.mdtaskfiles/deps/main.yaml
📚 Learning: 2025-07-01T14:52:15.217Z
Learnt from: jackluo923
Repo: y-scope/clp PR: 1054
File: components/core/tools/scripts/lib_install/musllinux_1_2/install-prebuilt-packages.sh:6-15
Timestamp: 2025-07-01T14:52:15.217Z
Learning: For installation scripts in the CLP project, maintain consistency in command patterns across platforms rather than applying platform-specific optimizations. When a platform follows a pattern of separate update and install commands (like `apt-get update && apt-get install` or `apk update && apk add`), preserve this pattern for uniform script structure.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-07-01T14:52:15.217Z
Learnt from: jackluo923
Repo: y-scope/clp PR: 1054
File: components/core/tools/scripts/lib_install/musllinux_1_2/install-prebuilt-packages.sh:6-15
Timestamp: 2025-07-01T14:52:15.217Z
Learning: For installation scripts in the CLP project, maintain consistency in command patterns across different platforms (e.g., using separate update and install commands like `apk update && apk add`, `apt update && apt install`, `yum update && yum install`) rather than platform-specific optimizations, to ensure uniform script structure and readability.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-07-07T17:41:15.655Z
Learnt from: jackluo923
Repo: y-scope/clp PR: 1054
File: components/core/tools/scripts/lib_install/musllinux_1_2/install-prebuilt-packages.sh:27-32
Timestamp: 2025-07-07T17:41:15.655Z
Learning: In CLP installation scripts, consistency across platform scripts is prioritized over defensive programming improvements. For example, when extracting Task binaries with tar in `install-prebuilt-packages.sh`, the extraction pattern should remain consistent with other platform scripts rather than adding defensive flags like `--strip-components=1` to handle potential tarball layout changes.
Applied to files:
taskfiles/deps/README.mdtaskfiles/deps/main.yaml
📚 Learning: 2025-03-18T07:27:54.738Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 0
File: :0-0
Timestamp: 2025-03-18T07:27:54.738Z
Learning: Double parentheses in the codebase are intentional and required for clang-tidy to pass. These should not be flagged as style issues in code reviews.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-08-17T16:19:24.478Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1100
File: integration-tests/README.md:5-6
Timestamp: 2025-08-17T16:19:24.478Z
Learning: In the CLP project, README.md files can have multiple H1 headings when it makes sense structurally (e.g., "Contributing" as a top-level section alongside the main title). The MD025 markdown linting rule should be ignored in such cases where multiple H1s are intentional.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-08-05T16:13:24.482Z
Learnt from: quinntaylormitchell
Repo: y-scope/clp PR: 1154
File: docs/src/user-guide/guides-using-presto.md:53-55
Timestamp: 2025-08-05T16:13:24.482Z
Learning: In the CLP project's documentation system, numbered list items with line breaks do not require additional indentation for continuation lines to remain part of the list item - the markdown parser correctly keeps wrapped content within the numbered list item even without strict indentation.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-05-06T09:48:55.408Z
Learnt from: kirkrodrigues
Repo: y-scope/clp PR: 881
File: components/core/tools/scripts/lib_install/ubuntu-jammy/install-prebuilt-packages.sh:35-41
Timestamp: 2025-05-06T09:48:55.408Z
Learning: For installation scripts in the CLP project, prefer explicit error handling over automatic dependency resolution (like `apt-get install -f`) when installing packages to give users more control over their system.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-10-17T19:59:35.299Z
Learnt from: junhaoliao
Repo: y-scope/clp PR: 1178
File: components/clp-package-utils/clp_package_utils/controller.py:757-757
Timestamp: 2025-10-17T19:59:35.299Z
Learning: In the y-scope/clp repository, prefer long-form command-line flags (e.g., `--recursive`) over short-form flags (e.g., `-R`) for readability, even if the long form is GNU-specific.
Applied to files:
taskfiles/deps/README.mdtaskfiles/deps/main.yaml
📚 Learning: 2025-08-29T07:26:53.532Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1271
File: components/core/tools/scripts/lib_install/centos-stream-9/install-prebuilt-packages.sh:27-33
Timestamp: 2025-08-29T07:26:53.532Z
Learning: In CLP's build tool installation scripts, CMake version constraints should accommodate platform differences rather than using exact version pinning. Range constraints like "cmake>=3.23,<3.24" are preferred over exact pinning (cmake==3.23.5) to allow for platform-specific package availability while maintaining required version bounds.
Applied to files:
taskfiles/deps/README.md
📚 Learning: 2025-09-15T18:53:15.844Z
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1226
File: taskfiles/deps/main.yaml:522-527
Timestamp: 2025-09-15T18:53:15.844Z
Learning: When ystdlib is built with -Dystdlib_BUILD_TESTING=OFF in taskfiles/deps/main.yaml, it does not require Catch2 settings to be injected via CMAKE_GEN_ARGS since testing is disabled and Catch2 is not needed during the build process.
Applied to files:
taskfiles/deps/README.mdtaskfiles/deps/main.yaml
📚 Learning: 2024-10-22T15:36:04.655Z
Learnt from: gibber9809
Repo: y-scope/clp PR: 504
File: components/core/src/clp_s/search/kql/CMakeLists.txt:29-29
Timestamp: 2024-10-22T15:36:04.655Z
Learning: When reviewing pull requests, focus on the changes within the PR and avoid commenting on issues outside the scope of the PR.
Applied to files:
taskfiles/deps/main.yaml
🪛 LanguageTool
taskfiles/deps/README.md
[uncategorized] ~10-~10: Use a comma before ‘but’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...f the library can be installed via CMake but a custom approach is used, briefly docu...
(COMMA_COMPOUND_SENTENCE_2)
[style] ~39-~39: Consider using a different verb to strengthen your wording.
Context: ..., examples, docs, or unused binaries to speed up the installation process. * Prefer dis...
(SPEED_UP_ACCELERATE)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: build-macos (macos-14, false)
- GitHub Check: rust-checks (ubuntu-22.04)
- GitHub Check: build (macos-15)
🔇 Additional comments (21)
components/core/CMakeLists.txt (3)
300-301: TODO comment documents planned refactor; aligns with learnings.The inline TODO appropriately defers global replacement of
zstd_TARGETreferences to a separate PR, consistent with team practice for focused migration efforts. This is aligned with the learning from PR #1156 that such refactoring improvements should be tracked separately.
304-308: LibLZMA discovery simplified; verify version requirement is sufficient.The custom Find module logic has been removed in favour of a simple
find_package(LibLZMA 5.8.1 REQUIRED)call. Line 305 references version 5.8.1 to address CVE-2024-3094 and CVE-2025-31115. Confirm that this centralized approach (removing FindLibLZMA.cmake) works correctly with the centralized installer configuration in taskfiles/deps/main.yaml and that the version constraint is enforced throughout the build pipeline.Based on learnings, the custom Find module supported flexible static/shared switching. Verify that relying solely on centralized installation and
find_package()does not introduce version mismatches or incorrect library variant selection in downstream consumers.
272-272: Hardcoded static target violates established build pattern and will fail in non-static builds.The assignment unconditionally uses
mongo::mongocxx_static, but all other libraries in the same file (Boost, libarchive, MariaDBClient) conditionally select targets based onCLP_USE_STATIC_LIBS. This inconsistency will cause linking failures whenCLP_USE_STATIC_LIBSisOFFand only the shared mongocxx variant is available. The mongocxx target selection must follow the same conditional pattern:if(CLP_USE_STATIC_LIBS) set(MONGOCXX_TARGET mongo::mongocxx_static) else() set(MONGOCXX_TARGET mongo::mongocxx_shared) endif()Alternatively, if static-only is intentional, document why mongocxx differs from all other dependencies.
⛔ Skipped due to learnings
Learnt from: Bill-hbrhbr Repo: y-scope/clp PR: 1156 File: components/core/CMakeLists.txt:772-772 Timestamp: 2025-08-09T04:07:27.083Z Learning: In the CLP project's CMakeLists.txt, when reviewing changes related to the ${zstd_TARGET} variable usage in test linking, the team is planning a refactoring PR to improve this mechanism. Guards for undefined target variables should be deferred to that separate PR rather than being added in focused dependency migration PRs.Learnt from: Bill-hbrhbr Repo: y-scope/clp PR: 1122 File: components/core/src/clp/clp/CMakeLists.txt:175-195 Timestamp: 2025-07-23T09:54:45.185Z Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.Learnt from: Bill-hbrhbr Repo: y-scope/clp PR: 1124 File: components/core/cmake/Modules/FindBZip2.cmake:49-65 Timestamp: 2025-08-03T18:56:07.366Z Learning: In CLP's custom CMake Find modules, `FindStaticLibraryDependencies` populates the `*_DYNAMIC_LIBS` variable even when building with static libraries. When the main library is static, all dependencies must also use static libraries - there's no fallback to shared libraries for dependencies.Learnt from: Bill-hbrhbr Repo: y-scope/clp PR: 1156 File: taskfiles/deps/main.yaml:70-71 Timestamp: 2025-08-06T07:32:28.462Z Learning: In LZ4's CMake build system (build/cmake/CMakeLists.txt), the option to build static libraries is `BUILD_STATIC_LIBS=ON`, not `LZ4_BUILD_STATIC=ON`. The correct options for building both shared and static LZ4 libraries are `-DBUILD_SHARED_LIBS=ON` and `-DBUILD_STATIC_LIBS=ON`.Learnt from: Bill-hbrhbr Repo: y-scope/clp PR: 1156 File: taskfiles/deps/main.yaml:70-71 Timestamp: 2025-08-06T07:32:28.462Z Learning: In LZ4's CMake build system (build/cmake/CMakeLists.txt), the option to build static libraries is `BUILD_STATIC_LIBS=ON`, not `LZ4_BUILD_STATIC=ON`. The correct options for building both shared and static LZ4 libraries are `-DBUILD_SHARED_LIBS=ON` and `-DBUILD_STATIC_LIBS=ON`.Learnt from: Bill-hbrhbr Repo: y-scope/clp PR: 1124 File: components/core/cmake/Modules/FindBZip2.cmake:60-60 Timestamp: 2025-07-24T21:56:05.806Z Learning: In CLP's custom CMake Find modules (like FindBZip2.cmake), when building with dynamic libraries, the code intentionally uses `bzip2_PKGCONF_STATIC_LIBRARIES` as input to `FindDynamicLibraryDependencies`. This is a deliberate fallback mechanism to ensure all library dependencies are resolved even in dynamic builds, using the static library list from pkg-config as a source of dependency information.Learnt from: gibber9809 Repo: y-scope/clp PR: 955 File: components/core/src/clp_s/search/sql/CMakeLists.txt:8-26 Timestamp: 2025-06-02T18:22:24.060Z Learning: In the clp project, ANTLR code generation at build time is being removed by another PR. When reviewing CMake files, be aware that some temporary suboptimal configurations may exist to reduce merge conflicts between concurrent PRs, especially around ANTLR_TARGET calls.Learnt from: Bill-hbrhbr Repo: y-scope/clp PR: 1184 File: taskfiles/deps/main.yaml:0-0 Timestamp: 2025-08-13T19:58:26.058Z Learning: In the CLP project, custom CMake find modules (like FindLibLZMA.cmake) are designed to flexibly link against either shared or static libraries based on availability, rather than requiring both variants to be built. The find modules use flags like LibLZMA_USE_STATIC_LIBS and temporarily modify CMAKE_FIND_LIBRARY_SUFFIXES to prefer the desired library type while gracefully falling back if needed.Learnt from: jackluo923 Repo: y-scope/clp PR: 1054 File: components/core/tools/scripts/lib_install/musllinux_1_2/install-prebuilt-packages.sh:27-32 Timestamp: 2025-07-07T17:41:15.655Z Learning: In CLP installation scripts, consistency across platform scripts is prioritized over defensive programming improvements. For example, when extracting Task binaries with tar in `install-prebuilt-packages.sh`, the extraction pattern should remain consistent with other platform scripts rather than adding defensive flags like `--strip-components=1` to handle potential tarball layout changes.Learnt from: Bill-hbrhbr Repo: y-scope/clp PR: 1124 File: components/core/CMakeLists.txt:171-172 Timestamp: 2025-08-04T17:23:14.646Z Learning: Bill-hbrhbr prefers concise, straightforward code over verbose defensive programming in CMake files. When find_package uses REQUIRED flag, additional existence checks are redundant and should be avoided.taskfiles/deps/README.md (1)
44-47: CMake policy and exception rules are well-documented.The guidance on
CMAKE_BUILD_TYPEandCMAKE_INSTALL_MESSAGEis clear and provides specific justification for these exceptions. This will help future maintainers understand when to override the "remove redundant flags" principle.taskfiles/deps/main.yaml (17)
94-94: Platform check correctly uses POSIX-compatible dot-sourcing syntax.Line 94 updates the Ubuntu platform check to use
. /etc/os-release && [ "$ID" = "ubuntu" ], which is POSIX-compatible (dot-sourcing withoutsourcekeyword). This aligns with the PR objective to make platform checks POSIX-compatible and matches the pattern applied to the spider task's precondition. Confirmed via learnings that explicitsourcewas avoided for POSIX compatibility.
160-160: antlr-jar task simplified correctly.The output file reference is now derived from the global variable
G_ANTLR_JAR_FILEinstead of being exposed as a public variable. This reduces the task's surface area and aligns with the consolidation goal. Removal ofCHECKSUM_FILEand manual checksum logic in favour of the centralizedyscope-dev-utils:remote:curltask simplifies maintenance.
167-183: antlr-runtime migrated to centralized installer with correct CMAKE arguments.The task now uses
utils:install-remote-cmake-libinstead of custom build logic. Verified correct CMAKE_GEN_ARGS:
ANTLR_BUILD_CPP_TESTS=OFFandANTLR_BUILD_SHARED=OFF: appropriate for building static-only libraries.CMAKE_POLICY_DEFAULT_CMP0135=NEW: ensures extracted files use current timestamp, necessary for proper rebuild detection.CMAKE_SOURCE_DIR: "runtime/Cpp": correctly points to the C++ runtime subdirectory within the antlr4 archive.- Checksum and URL are hardcoded for maintainability (avoids version parsing from URLs per documentation).
Verify that the SHA256
9f18272a9b32b622835a3365f850dd1063d60f5045fb1e12ce475ae6e18a35bbfor antlr4 v4.13.2 archive is correct.
188-189: Boost task now includes explicit deps section for clarity.Adding the
deps: [utils:init]section makes the task's dependencies explicit even though boost uses a custom installer task rather than the centralized pattern. This improves readability and ensures consistent initialization.
214-216: Catch2 CMAKE_GEN_ARGS correctly disables tests, docs, and extras using lib-specific flags.The flags
CATCH_BUILD_TESTING,CATCH_INSTALL_DOCS, andCATCH_INSTALL_EXTRASare all lib-specific (preferred over genericBUILD_TESTINGper guidelines). These appropriately reduce the installation footprint.
260-273: LibLZMA refactored with comprehensive CMAKE_GEN_ARGS for consistency.The task now uses centralized install-remote-cmake-lib with extensive CMAKE_GEN_ARGS:
BUILD_TESTING=OFF,XZ_DOC=OFF: disable unnecessary components.XZ_TOOL_*=OFF: disable tools (xz, xzdec, lzmainfo, lzmadec, scripts, symlinks) not needed by CLP.CMAKE_BUILD_TYPE=ReleaseandCMAKE_INSTALL_MESSAGE=LAZY: follow documented conventions.- Version constraint 5.8.1 addresses CVE-2024-3094 and CVE-2025-31115 (documented in CMakeLists.txt line 305).
This consolidation removes the custom FindLibLZMA.cmake logic and aligns with the centralized approach seen throughout the PR. TARBALL_URL and TARBALL_SHA256 are hardcoded for stability.
Verify SHA256
507825b599356c10dca1cd720c9d0d0c9d5400b9de300af00e4d1ea150795543for xz v5.8.1 release archive.
301-301: LZ4 CMAKE_GEN_ARGS correctly usesBUILD_SHARED_LIBS=OFFto build static-only.Per learnings from PR #1156, LZ4's CMake build system uses
BUILD_SHARED_LIBS(generic CMake convention) not LZ4-specific flags for library variant control. SettingBUILD_SHARED_LIBS=OFFis correct for static-only building.
319-319: MariaDB-connector-cpp precondition updated to POSIX-compatible dot-sourcing.Mirrors the Ubuntu platform check update in the spider task (line 94), using
. /etc/os-release && [ "$ID" = "ubuntu" ]for POSIX compatibility.
326-331: MariaDB-connector-cpp CMAKE_GEN_ARGS correctly configured for DEB layout.The task sets
INSTALL_LAYOUT=DEBandUSE_SYSTEM_INSTALLED_LIB=ONas required, disables tests withWITH_UNIT_TESTS=OFF, and follows the documented conventions. The hardcoded version (1.1.5) with SHA256 ensures reproducibility.
359-359: Mongocxx adds explicitENABLE_EXAMPLES=OFFflag.The task correctly adds the flag to disable examples during installation, reducing the footprint. This is a lib-specific flag following documented best practices.
363-364: TARBALL_URL formatting with line continuation is consistent and correct.Both mongocxx and msgpack-cxx TARBALL_URLs use YAML multi-line string formatting with proper indentation for readability. URLs are hardcoded and version-pinned in the URL itself (mongocxx r4.1.1, msgpack-cxx 7.0.0), avoiding version parsing.
Also applies to: 383-384
445-445: SQLite3 extraction directory renamed to follow-extractednaming convention.The variable
EXTRACTION_DIRis now{{.G_DEPS_CPP_DIR}}/{{.LIB_NAME}}-extracted, consistent with the documented guideline and applied uniformly across all library tasks in this refactoring (e.g., liblzma, utfcpp).
462-466: SQLite3 cmake settings file generation is correct.The generated cmake settings file properly sets
CLP_SQLITE3_SOURCE_DIRECTORYandCLP_SQLITE3_INCLUDE_DIRECTORYusing heredoc syntax, matching the pattern used in utfcpp (lines 485-488). This exposes the paths for use by the main CMakeLists.txt.
472-472: UTF-CPP output directory renamed and cmake settings generation simplified.The variable
UTFCPP_OUTPUT_DIRis renamed to use the-extractedsuffix (line 472), consistent with newly documented convention. The cmake settings generation (lines 485-488) is streamlined to a single variableCLP_UTFCPP_INCLUDE_DIRECTORYpointing to the extracted directory. The comment explains this library does not use CMake installation but rather direct source inclusion, aligning with documented special case handling.Also applies to: 485-488
499-499: YAML-CPP uses lib-specific test flag instead of generic BUILD_TESTING.Line 499 correctly uses
YAML_CPP_BUILD_TESTS=OFF(lib-specific flag per documentation) instead of the genericBUILD_TESTING=OFF. This is consistent with the documented guideline to prefer lib-specific testing flags.
514-515: ystdlib now includesCMAKE_BUILD_TYPE=ReleaseandCMAKE_INSTALL_MESSAGE=LAZY.These additions align with the documented exceptions to the "remove redundant flags" rule. Even if ystdlib's CMakeLists.txt has defaults, explicitly setting these here ensures consistent Release builds and reduced log verbosity across the dependency installation pipeline.
549-549: zstd explicitly disables shared library building.Line 549 adds
ZSTD_BUILD_SHARED=OFFto ensure static-only building, consistent with the static-library focus documented in the README and applied across other libraries (lz4, antlr-runtime, etc.).
CMAKE_GEN_ARGSof each task to align with the newly established conventions.antlr-jar.antlr-runtimeto build usingutils:install-remote-cmake-lib.spiderplatform check POSIX-compatible.echowith heredoc (cat <<EOF) for clearer text generation.Description
Due to various
CMAKE_GEN_ARGSissues encountered while reviewing other PRs such as #1377 and #1414, we standardize CMake lib writing once and for all to cut down on future review/development time.One important feature is that we enforce using static library artifacts and export targets whenever possible when linking against CLP targets.
Running:
under
clp/build/deps/cppreturns:Boostis a special cases handled byyscope-dev-utilsmongocxxandzlibmongocxx, we link against the static export targetmongo::mongocxx_staticfind_package()forzlib. It will be used byLibArchivewhen we switch it to task-based installation.Checklist
breaking change.
Validation performed
Summary by CodeRabbit
Documentation
Chores
Compatibility